{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='title'></a>\n",
    "# Project: 泰坦尼克号数据调查\n",
    "\n",
    "## Table of Contents\n",
    "<ul>\n",
    "<li><a href=\"#intro\">Introduction</a></li>\n",
    "<li><a href=\"#wrangling\">Data Wrangling</a></li>\n",
    "<li><a href=\"#eda\">Exploratory Data Analysis</a></li>\n",
    "<li><a href=\"#conclusions\">Conclusions</a></li>\n",
    "</ul>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='intro'></a>\n",
    "## Introduction\n",
    "> 数据集记录了泰坦尼克号上的乘客的相关信息，包括名字、性别、年龄、票信息、是否生还等。<br />\n",
    "> 数据表中相关字段的信息如下：<br />"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<table>\n",
    "<tr>\n",
    "<td align=\"left\">Variable</td>\n",
    "<td align=\"left\">Definition</td>\n",
    "<td align=\"left\">Key</td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Survived</td>\n",
    "<td align=\"left\">survival</td>\n",
    "<td align=\"left\">0 = No, 1 = Yes</td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Pclass</td>\n",
    "<td align=\"left\">Ticket class</td>\n",
    "<td align=\"left\">1 = 1st(Upper), 2 = 2nd(Middle), 3 = 3rd(Lower)</td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Sex</td>\n",
    "<td align=\"left\">sex</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Age</td>\n",
    "<td align=\"left\">Age in years</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Sibsp</td>\n",
    "<td align=\"left\"># of siblings / spouses aboard the Titanic</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Parch</td>\n",
    "<td align=\"left\"> # of parents / children aboard the Titanic</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Ticket</td>\n",
    "<td align=\"left\">Ticket number</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Fare</td>\n",
    "<td align=\"left\">Passenger fare</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Cabin</td>\n",
    "<td align=\"left\">Cabin number</td>\n",
    "<td align=\"left\"></td>\n",
    "</tr>\n",
    "\n",
    "<tr>\n",
    "<td align=\"left\">Embarked</td>\n",
    "<td align=\"left\">Port of Embarkation</td>\n",
    "<td align=\"left\">C = Cherbourg, Q = Queenstown, S = Southampton</td>\n",
    "</tr>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 展开调查的问题：\n",
    "<ul>\n",
    "<li><a href=\"#eda\">问题1：年龄与乘客生还的情况怎么样？</a></li>\n",
    "<li><a href=\"#question2\">问题2：性别与乘客生化的情况怎么样？</a></li>\n",
    "<li><a href=\"#question3\">问题3：不同的票等级(pclass)与乘客生还的情况？</a></li>\n",
    "<li><a href=\"#question4\">问题4：不同登陆港口的乘客与生化情况如何？</a></li>\n",
    "<li><a href=\"#question5\">问题5：费用与票价等级的对应关系如何？ </a></li>\n",
    "<li><a href=\"#question6\">问题6：不同费用的乘客的生还情况如何？</a></li>\n",
    "<li><a href=\"#question7\">问题7：从三个港口登陆的乘客的费用是否有不同？</a></li>\n",
    "</ul>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from decimal import Decimal\n",
    "from fractions import Fraction\n",
    "import scipy\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='wrangling'></a>\n",
    "## Data Wrangling\n",
    "\n",
    "\n",
    "\n",
    "### General Properties"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "titanic_df = pd.read_csv(r'.\\titanic_data\\titanic-data.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Braund, Mr. Owen Harris</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>A/5 21171</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>PC 17599</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C85</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>Heikkinen, Miss. Laina</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>STON/O2. 3101282</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>113803</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>C123</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Allen, Mr. William Henry</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>373450</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   PassengerId  Survived  Pclass  \\\n",
       "0            1         0       3   \n",
       "1            2         1       1   \n",
       "2            3         1       3   \n",
       "3            4         1       1   \n",
       "4            5         0       3   \n",
       "\n",
       "                                                Name     Sex   Age  SibSp  \\\n",
       "0                            Braund, Mr. Owen Harris    male  22.0      1   \n",
       "1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1   \n",
       "2                             Heikkinen, Miss. Laina  female  26.0      0   \n",
       "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1   \n",
       "4                           Allen, Mr. William Henry    male  35.0      0   \n",
       "\n",
       "   Parch            Ticket     Fare Cabin Embarked  \n",
       "0      0         A/5 21171   7.2500   NaN        S  \n",
       "1      0          PC 17599  71.2833   C85        C  \n",
       "2      0  STON/O2. 3101282   7.9250   NaN        S  \n",
       "3      0            113803  53.1000  C123        S  \n",
       "4      0            373450   8.0500   NaN        S  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>714.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>446.000000</td>\n",
       "      <td>0.383838</td>\n",
       "      <td>2.308642</td>\n",
       "      <td>29.699118</td>\n",
       "      <td>0.523008</td>\n",
       "      <td>0.381594</td>\n",
       "      <td>32.204208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>257.353842</td>\n",
       "      <td>0.486592</td>\n",
       "      <td>0.836071</td>\n",
       "      <td>14.526497</td>\n",
       "      <td>1.102743</td>\n",
       "      <td>0.806057</td>\n",
       "      <td>49.693429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.420000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>223.500000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>20.125000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>7.910400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>446.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>28.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>14.454200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>668.500000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>31.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>891.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>512.329200</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       PassengerId    Survived      Pclass         Age       SibSp  \\\n",
       "count   891.000000  891.000000  891.000000  714.000000  891.000000   \n",
       "mean    446.000000    0.383838    2.308642   29.699118    0.523008   \n",
       "std     257.353842    0.486592    0.836071   14.526497    1.102743   \n",
       "min       1.000000    0.000000    1.000000    0.420000    0.000000   \n",
       "25%     223.500000    0.000000    2.000000   20.125000    0.000000   \n",
       "50%     446.000000    0.000000    3.000000   28.000000    0.000000   \n",
       "75%     668.500000    1.000000    3.000000   38.000000    1.000000   \n",
       "max     891.000000    1.000000    3.000000   80.000000    8.000000   \n",
       "\n",
       "            Parch        Fare  \n",
       "count  891.000000  891.000000  \n",
       "mean     0.381594   32.204208  \n",
       "std      0.806057   49.693429  \n",
       "min      0.000000    0.000000  \n",
       "25%      0.000000    7.910400  \n",
       "50%      0.000000   14.454200  \n",
       "75%      0.000000   31.000000  \n",
       "max      6.000000  512.329200  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 观察缺失值数据并处理缺失值数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#设计一个函数，返回一个字典，字典的key是是字段名，value是该字段有NaN值的个数。\n",
    "\n",
    "def get_null_record(df): #df为DataFrame对象\n",
    "    dict_null = {}\n",
    "    for column in df.columns:\n",
    "        if not len(df[df[column].isnull()]) == 0:\n",
    "            dict_null[column] = len(df[df[column].isnull()])\n",
    "    return dict_null"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'Age': 177, 'Cabin': 687, 'Embarked': 2}\n",
      "891\n"
     ]
    }
   ],
   "source": [
    "#确认一下titanic_df数据集中的每个字段的NaN值情况\n",
    "data_null_dic = get_null_record(titanic_df)\n",
    "print data_null_dic\n",
    "print len(titanic_df)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 处理船舱Cabin字段的缺失值：\n",
    " 船舱Cabin字段的NaN数量太庞大，有687个，将这些缺失值用'Unknown'来填充。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "titanic_df['Cabin'].fillna('Unknown', inplace = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 处理年龄的缺失值：\n",
    "用年龄缺失值来填充这些缺失值。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "mean_age = titanic_df['Age'].mean()\n",
    "titanic_df['Age'].fillna(mean_age,inplace = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 处理登陆港口的缺失值：\n",
    "登陆港口的缺失值很少，只有2个，就随便选三种中一个来填充，这里选'S'填充。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "titanic_df['Cabin'].fillna('S', inplace = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='eda'></a>\n",
    "## Exploratory Data Analysis\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "### Research Question 1 : 年龄与乘客生还的情况怎么样？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.1 单变量探索：生化或未生化数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x90cdcf8>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAE+CAYAAACX0IdOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGjNJREFUeJzt3Xu4XHV97/H3h4igAgqSphGowYJVqBXbiNdaFK14aaGo\nEEWLz0Fpn0Nre/TUQmurpzUWe7FeaU1ba2qFGFGOUY9XBK8oBqsiUA9UoIBAAoJc6kETv+ePtXYY\ndn97Z2/K7LXDvF/PM89e81uX+c6steczv9+aS6oKSZKm22noAiRJi5MBIUlqMiAkSU0GhCSpyYCQ\nJDUZEJKkJgNCGpHkY0mOH8N2353k9ff0du+NklyU5LAxbPfcJC+7p7d7b2ZA3AskeVGSjUluS3Jt\n/yT35AW43UpywALczpFJvp7kliQ3JPlMkv3HcVtV9ayqWjuObY9LksP6fXHatPYvJHnpHNZf0a9/\nn7EVOQ9VdXBVnTt0HTIgdnhJXgm8GXgDsAz4KeAdwK8OWdc9pQ+gfwJeBTwQ2J/u/m29G9taFE+A\n/xWz3IfbgZckWbFw1czfvWEfTBIDYgeW5IHAnwAnVdUHq+r2qvpRVX2kql7dL7NLkjcn+W5/eXOS\nXfp5L03yhWnb3NYr6IdF3pHko0luTfKVJD/dz/tcv8o3+p7LsdO2s0uSm5P87Ejb0iQ/SPITSfZO\n8pF+me8l+XyS1vF4CHB5VZ1dnVur6gNV9e8jNb5+5DYOS3L1yPUrkvx+km8Ct/fTZ06r9S1J3tpP\nn5vkZdurv7/+3L5nc3OSLyX5uZFlH5Pka/3j9j5g11n2405JXpPkyiSbkvxTv29HX92fkOTfgc/M\nsJmbgXcDr53vbQBT+/Lmfl8+obF+kvx1v+4tSS6cemymD91MP676+k9KcilwaZK/SfKX07b/of7F\nztQ+e3qSh/SP917THtcbkuzcX/9vSS5JclOSTyR56Miyz0jyr0m+n+TtQGZ47DQDA2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ns//ZokH0zy80PXpYn2TuCHAEmeAvwZsBb4PrBmwLomjgGhP6qqW5M8GXg68A/A3wxckybbkqr6\nXj99LLCmqj5QVX8EHDBgXRPHgNDW/u9z6P4RPwr4/Tca0pIkU8PfhwOfGZnnsPgC8sHWNUneCTwD\neGOSXfCFg4Z1BvDZJDcAPwA+D5DkALphJi0QPwcx4ZLcHzgCuLCqLk2yHHhUVX1y4NI0wZI8HlgO\nfLKqbu/bHg7sVlVfG7S4CWJAaJskJ1aVJwElAQ4l6K5+c+gCJC0eBoRGZegCJC0eBsSESzL6Qblf\nabRJmlAGhD4wNVFVV/eTZw5Ui6RFxLe5TqgkjwAOBh6Y5OiRWXvQfbWypAlnQEyunwGeCzyIfmip\ndyvw8kEqkrSo+DbXCZfkCVV13tB1SFp8PAehq5KclWRTf/lAkn2HLkrS8AwI/SOwAXhIf/lw3yZp\nwjnENOGSfKOqHj2t7etVdchQNUlaHOxB6IYkL06ypL+8GLhx6KIkDc8exIRL8lDgbcAT6H7e8UvA\nK6rq3wctTNLgDAhJUpOfg5hQSf54ltlVVX+6YMVIWpTsQUyoJK9qND8AOAF4cFXttsAlSVpkDAiR\nZHfgd+jCYT3wV1W1adiqJA3NIaYJlmQv4JXAccBa4Oer6qZhq5K0WBgQEyrJXwBHA2vofmL0toFL\nkrTIOMQ0oZL8GLgD2EL39tZts+hOUu8xSGGSFg0DQpLU5CepJUlNBoQkqcmAkCQ1GRCSpKb/DxPq\nIcEUedh9AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x9149c88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画年龄的条形图\n",
    "survived_date = pd.Series(titanic_df.groupby(['Survived'])['PassengerId'].count().values,index = ['Not-survived','Survived'])\n",
    "survived_date.plot(kind='bar')\n",
    "\n",
    "plt.ylabel('Count')\n",
    "plt.title('Count vs Survived or Not-survived')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从条形图看出，总体死亡人数比获救生还的人数多。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.2 单变量探索：年龄"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAENCAYAAAABh67pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGTNJREFUeJzt3X+Q3XV97/HnKz8aFBwIsA0xSd0wjbaBSmi3ERBtgAoB\nW4OtlwkzesMtNXYmVehwp5Po3BZ6J73Y+qOdVpwJikktkKYKJcVeJES4ilriAgHzg8hqFpLckCwo\nJtgaSHjfP76fNd+7nt1zzp49+z374fWY+c75fj/fX+89u3mdbz7fH0cRgZmZ5WtS1QWYmVl7OejN\nzDLnoDczy5yD3swscw56M7PMOejNzDLnoLemSApJD1VdRz2SulOta6uupRmSLpX0LUkvpvr/peqa\nbOJz0L8GpQAZ8QYKSf1pue4x3O+EC19J16SarxmHfXUD9wBzgduAm4D1TW5jU6p3j6TJY16kTUhT\nqi7AJpxfBf6j6iIy9dvACcANEXFHsytLOhO4BAhgNnA5cO+YVmgTko/orSkR8VREPFt1HZl6Y3r9\nv6Nc/4OAgI+n6eUtV2RZcNBbU2r10Ut6g6T/IWmbpEOSDkv6vqR/kvQbaZkbgd1plWWD3UeNdouk\nrqR+SSdL+ntJ+yT9VNIOSR+RpCZ+hpmSPpO297KkAUl3DdZaWu4h4Atp8gtDau5ucF9XSfq6pB9L\n+k9J35W0StK00jKLUlfaTanpwdJ+FjW4nynANcAh4C+AR4ErJM0aYZ3flHR/+n0dkvSApPMl3Tjc\nviX9iqS1qWvoZUkHJN0h6S2N1GnVcNeNtSQF7H3ABcC3gc8BRym6Di4CvkEROg8BpwDXAU8A5ZOM\nWxvc3S8AD6TtrE/Tvw/8LfAWYEUD9c4FHqY4ev4acCcwB/gvwLsl/X5EDHZ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H1wMWS/rED6gJ+djRIRByk6G9e2AG17QX2pv+RAXyJIvir\nrmvQ5cBjEXEgTVdd128DuyNiICJeAe4CLhiPuiZi0E+ExytsBJal8WUU/ePjSpKAzwM7I+JTnVKb\npC5Jp6Tx11GcN3iq6roiYlVEzI6Iboq/qa9FxPurrgtA0omS3jA4TtGvu63q2iLiOWCPpLekpkso\nHkVe+XuWXM3xbhuovq5ngfMkvT79+7yE4uR1++uq6iRJiyc1rgC+B3wf+FjFtdxJ0d/2CsURzrXA\naRQn9Z4GHgBOraCuCyn+C/gksDUNV1RdG/BW4PFU1zbgz1J75e9ZqcZFHD8ZW3ldwJnAE2nYPvg3\n3yG1LQB60+/zX4DpHVLXicALwMmltk6o6yaKA5ttwBeBaeNRlx+BYGaWuYnYdWNmZk1w0JuZZc5B\nb2aWOQe9mVnmHPRmZplz0JuZZc5Bb2aWuf8HIHkwMVsN5lIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x91c98d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画年龄的直方图\n",
    "titanic_df['Age'].hist()\n",
    "#设置标题\n",
    "plt.title('Hist plot of Age', fontsize = 20)\n",
    "#消除网格线\n",
    "plt.grid(False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从年龄的直方图可以看出，大部分的乘客年龄在20-40虽之间。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.3 计算年龄段与生还的相关系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "80.0\n"
     ]
    }
   ],
   "source": [
    "# 计算最大年龄\n",
    "age_max = titanic_df['Age'].max()\n",
    "print age_max"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.42\n"
     ]
    }
   ],
   "source": [
    "#计算最小年龄\n",
    "age_min = titanic_df['Age'].min()\n",
    "print age_min"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0, 12, 24, 36, 48, 60, 72, 84])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#对age变量分组，间隔为12.年龄段将被分成['(0, 12]', '(12, 24]', '(24, 36]', '(36, 48]', '(48, 60]', '(60, 72]', '(72, 84]']\n",
    "bins = np.arange(0,90,12)\n",
    "bins"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#新增一个变量Age_group,对应每个Age变量所属年龄段标签\n",
    "titanic_df['Age_group'] = pd.cut(titanic_df['Age'], bins)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "      <th>Age_group</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Braund, Mr. Owen Harris</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>A/5 21171</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>(12, 24]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>PC 17599</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C85</td>\n",
       "      <td>C</td>\n",
       "      <td>(36, 48]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>Heikkinen, Miss. Laina</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>STON/O2. 3101282</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>(24, 36]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>113803</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>C123</td>\n",
       "      <td>S</td>\n",
       "      <td>(24, 36]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Allen, Mr. William Henry</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>373450</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>(24, 36]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   PassengerId  Survived  Pclass  \\\n",
       "0            1         0       3   \n",
       "1            2         1       1   \n",
       "2            3         1       3   \n",
       "3            4         1       1   \n",
       "4            5         0       3   \n",
       "\n",
       "                                                Name     Sex   Age  SibSp  \\\n",
       "0                            Braund, Mr. Owen Harris    male  22.0      1   \n",
       "1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1   \n",
       "2                             Heikkinen, Miss. Laina  female  26.0      0   \n",
       "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1   \n",
       "4                           Allen, Mr. William Henry    male  35.0      0   \n",
       "\n",
       "   Parch            Ticket     Fare    Cabin Embarked Age_group  \n",
       "0      0         A/5 21171   7.2500  Unknown        S  (12, 24]  \n",
       "1      0          PC 17599  71.2833      C85        C  (36, 48]  \n",
       "2      0  STON/O2. 3101282   7.9250  Unknown        S  (24, 36]  \n",
       "3      0            113803  53.1000     C123        S  (24, 36]  \n",
       "4      0            373450   8.0500  Unknown        S  (24, 36]  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.056157878334184556"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = titanic_df['Survived'].corr(titanic_df['Age_group'], method='kendall')\n",
    "r"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "年龄段与生还的相关系数很小，也即相关性很弱。相关系数在这里仅仅作为参考。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.4 计算各年龄段和乘客生化的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Age_group</th>\n",
       "      <th>PassengerId</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(0, 12]</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(12, 24]</td>\n",
       "      <td>208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(24, 36]</td>\n",
       "      <td>419</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(36, 48]</td>\n",
       "      <td>115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(48, 60]</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>(60, 72]</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>(72, 84]</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Age_group  PassengerId\n",
       "0   (0, 12]           69\n",
       "1  (12, 24]          208\n",
       "2  (24, 36]          419\n",
       "3  (36, 48]          115\n",
       "4  (48, 60]           58\n",
       "5  (60, 72]           20\n",
       "6  (72, 84]            2"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计每个年龄段的总人数\n",
    "df_total_count_each_age_group = titanic_df.groupby(['Age_group'],as_index = False)['PassengerId'].count()\n",
    "df_total_count_each_age_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Age_group</th>\n",
       "      <th>PassengerId</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(0, 12]</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(12, 24]</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(24, 36]</td>\n",
       "      <td>152</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(36, 48]</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(48, 60]</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>(60, 72]</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>(72, 84]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Age_group  PassengerId\n",
       "0   (0, 12]           40\n",
       "1  (12, 24]           78\n",
       "2  (24, 36]          152\n",
       "3  (36, 48]           41\n",
       "4  (48, 60]           26\n",
       "5  (60, 72]            4\n",
       "6  (72, 84]            1"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#统计每个年龄段的生还人数\n",
    "df_survival_count_each_age_group = titanic_df[titanic_df['Survived'] == 1].groupby(['Age_group'], as_index = False)['PassengerId'].count()\n",
    "df_survival_count_each_age_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Age_group\n",
       "(0, 12]     0.579710\n",
       "(12, 24]    0.375000\n",
       "(24, 36]    0.362768\n",
       "(36, 48]    0.356522\n",
       "(48, 60]    0.448276\n",
       "(60, 72]    0.200000\n",
       "(72, 84]    0.500000\n",
       "dtype: float64"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算每个年龄段的生还率\n",
    "survival_rate_each_group = df_survival_count_each_age_group['PassengerId']/df_total_count_each_age_group['PassengerId']\n",
    "survival_rate_each_group = pd.Series(survival_rate_each_group.values, index = df_survival_count_each_age_group['Age_group'])\n",
    "survival_rate_each_group"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#### 1.5 可视化年龄段与生还率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0xb3a40b8>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_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fJRSTdIul7V8phIOlDSRS33+6yqleqQ\ntFzSR8r5i1QtCRrRM0kQMR7NBr5t+5fAXWWSulcB06hmNj0GeB48Oi79M8ARtp8NnEW1PO1IvgS8\nwfYMYPic/s8q93lReb8ZwH5UU1R/tF3iafFb208HPku1fkZEz6SqG+PR0cCnyvZ5ZX9z4N/K5G53\nSLqiHH8asC9waTWPHRMYYaZfSTsA29n+cSn6GvDyllMutX132X4+1Xz/DwN3SroS2B+4r0Ps57Z8\n/WSnDxqxIZIgYlyRtBPV4ixPV7VOwwSq9SYuGOkSYKnt522Et3+gi3PW8tia/dbDjnuE7YiNLk1M\nMd4cAZxt+ym2p5XFWG4B7gZeXfoidgEOLOffDEyU9GiTk6Ta9SnK1AhrJD2nFM1pE8cPgKMkTVC1\nfvULgUVUq9HtLWmrUiM5eNh1R7V8/TERPZQaRIw3R1OtGd3qfGAvqjUEbgRuA35G1d7/h9JZ/WlJ\n21P9zJwOLB3h/sdRrQr2CNUynr8d4bwLqPo5rqWqCbxraBU6SQuo1rO+BRg+SduOkq4DHqKBEVgx\nvmQupohC0ra271e1VOUi4IChX9qjvUfZPgmYZPutGym+5cBM27/ZGPeL6CQ1iIh1LirNOlsCHxpt\ncigOk3Qy1c/WrcDrNmJ8EWMqNYiI9SDpc8ABw4o/ZftLTcQT0QtJEBERUSujmCIiolYSRERE1EqC\niIiIWkkQERFRKwkiIiJq/S8WmU7KaldQ6gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb36fb00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#可视化每个年龄段的生还人数\n",
    "titanic_df.groupby(['Age_group'])['PassengerId'].count().plot(kind='bar')\n",
    "plt.title('Count vs Age_group')\n",
    "plt.ylabel('Survival Count')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生还人数最多的年龄段在24-36岁之间。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xb36f0b8>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEoCAYAAACjGLHcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFvNJREFUeJzt3Xu0nXV95/H3xwS81HppyYwOEIOKl7Roq4cwjo6i1imU\nrkYtVajVUqURZ1HHcdkxnUtnZlHXgtq1xhuahQ5eplaWrUWzIIpWrdpVqQlKI6HCpIgSqjWi4gWn\nmPKdP/YTujk9OXufZO/z7P3j/VorK/t5nl+e802yz+c8+/dcvqkqJEltuU/fBUiSJs9wl6QGGe6S\n1CDDXZIaZLhLUoMMd0lqkOEuSQ0y3CWpQYa7JDVo7TiDkpwGvBFYA7yjqi5cYsypwBuAo4BvVtUz\nltvnMcccUxs2bFhpvZJ0r3bNNdd8s6rWjRo3MtyTrAEuBp4D7AN2JtleVdcPjXkI8FbgtKr6apJ/\nMWq/GzZsYNeuXaOGSZKGJPnKOOPGmZbZBOytqpuq6k7gMmDzojG/CvxpVX0VoKq+sZJiJUmTNU64\nHwvcMrS8r1s37DHAQ5P8eZJrkrxkqR0l2ZJkV5Jd+/fvP7yKJUkjTeqE6lrgycAZwM8D/y3JYxYP\nqqpLqmqhqhbWrRs5ZSRJOkzjnFC9FTh+aPm4bt2wfcBtVfUD4AdJPg08EbhxIlVKklZknCP3ncCJ\nSU5IcjRwFrB90ZgPAU9LsjbJA4BTgL+ZbKmSpHGNPHKvqgNJzgeuYnAp5KVVtSfJed32bVX1N0k+\nAuwG7mJwueR10yxcknRo6asT08LCQnkppCStTJJrqmph1DjvUJWkBo11h+os2LD1yqnu/+YLz5jq\n/iVpNXnkLkkNMtwlqUGGuyQ1yHCXpAYZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDTLcJalBhrsk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oNt2d6a5EtJPpZkR5Izu21PTvKp\nJNckuSqDRiKH2vfJSXYnuTbJ6zN4HC1JzkmyPckngI9n4PVJrkvyxQxawpHk1CRXDO3vLRl0eCLJ\nzUl+vxv/uQza4ElTY7hr3mwGPlJVNwK3dQ/Mej6wgcETEl8MPAXuvu74zcCZVfVk4FKW76n7TuDl\n3SN+Fz+T+0ndfp7Rfb2fYdDO7ueA1y/3Q2PI7VV1EvAWBs+/l6bGj5iaN2czaMYNcFm3vBb44+5B\nU19P8slu+2MZPF/7Y4NnarGGQzwOOslDgB+vqs92q/4I+MWhIR+rqm91r5/G4Hnd/wj8fZJPAScD\n3x1R+/uGfv9fo/6i0pEw3DU3kvwEg8YIJ2XwnPU1DJ4Xf/mh/giwp6qeMoEv/4Mxxhzgnp+GF7df\nq0O8libOaRnNkzOB/1NVj6iqDV0jhC8z6L35y93c+78ETu3G3wCsS3L3NE0O0Re1u138e0lO6Vad\ntUwdnwFemGRNknXA04HPMejitDHJfbtPAs9e9OdeOPT7Z5GmyCN3zZOzGfQ4HfYB4PEMngF+PXAL\n8HkG89t3didW35TkwQze728A9hxi/y9j0E3nLgat624/xLjLGczr/zWDI/D/dLB7U5L3M+i/+mVg\n8QOjHppkN/AP9HClj+5dfLaMmpDkgVX1/Qzas30OeOrBwF3pPrrXW4GHV9V/mFB9NwMLVfXNSexP\nGsUjd7Xiim4q5GjggpUGe+eMJL/D4PviK8A5E6xPWlUeueteJ8nFwFMXrX5jVb2zj3qkaTDcJalB\nXi0jSQ0y3CWpQYa7JDXIcJekBv1/4vAti9CMGpcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb4a57f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#可视化每个年龄段的生还率\n",
    "survival_rate_each_group.plot(kind='bar')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "在(0-12]年龄的乘客生还率最高，在(60,72]年龄段的乘客的生还率最低，其它各年龄段的生还率差别不是很大。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "> 结论：\n",
    ">1. 死亡人数比获救人数多。\n",
    ">2. 生还与年龄段的相关系数很小。\n",
    ">3. 生还人数最多的年龄段在24-36岁之间。\n",
    ">4. 在(0-12]年龄的乘客生还率最高，在(60,72]年龄段的乘客的生还率最低，其它各年龄段的生还率差别不是很大。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='question2'></a>\n",
    "### Research Question 2：性别与乘客生化的情况怎么样？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1 单变量探索：性别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0xb849898>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEvCAYAAABfWlZwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFxhJREFUeJzt3X20XXV95/H3h4AgxRYo1zQSNKGkOsEH1BRFrUWZEVw+\nwLhcGK1tZqRldUp9GF22QZ0Z7Zglra1jdQmuTB+M9QFTCyVixcEIVJcPGGwUA82QihkSAwlYFOxM\nJPidP86+ekh/9+YGcu6+4bxfa9119v7tvc/53qx77ye/328/pKqQJGlvh/RdgCRpbjIgJElNBoQk\nqcmAkCQ1GRCSpCYDQpLUZEBIkpoMCB30krwqyYYk9ybZkeQzSZ4zC59bSU6ahc85O8nGJD9IcmeS\nzydZPOrPlQ7tuwDpoUjyRmAl8NvAZ4EfAWcCLwW+2GNpB0QXQB8GXgZ8HjgKeAFwf591aTzYg9BB\nK8nPAX8AXFBVl1XVD6vqvqq6sqp+r9vn8CTvTfLd7uu9SQ7vtv2HJF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PInBrdUfPTsVSg+NcxDSg5Dk8d0dcCedAtwMTHQT\n2CQ5rBtaIsnLgGOB5wLvT3L0bNcs7S/nIKQHoRteej9wNLAH2AKcDywE3gf8HIMe+nuByxnMT5xR\nVbcleR3w9Kpa0Uft0kwZEJKkJoeYJElNBoQkqcmAkCQ1GRCSpCYDQpLUZEBIkpoMCElSkwEhSWr6\n/xl2XBQY04GQAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x9515ef0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画所有乘客性别的条形图\n",
    "sex_data = titanic_df.groupby(['Sex']).PassengerId.count()\n",
    "sex_data.plot(kind='bar')\n",
    "\n",
    "plt.ylabel('Count')\n",
    "plt.title('Count vs Sex')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从条形图可以看出，船上的男性乘客比女性乘客的数量多。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.2 计算性别与生还的相关系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.54335138065775512"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df['Survived'].corr(titanic_df['Sex'], method = 'kendall')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生还字段与性别字段的相关系数也不强。 相关系数在这里仅仅作为参考。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.3 计算性别与生还的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Sex\n",
       "female    314\n",
       "male      577\n",
       "Name: PassengerId, dtype: int64"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算男女人数放在Series里\n",
    "total_count_sex = titanic_df.groupby(['Sex'])['PassengerId'].count()\n",
    "total_count_sex\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Sex\n",
       "female    233\n",
       "male      109\n",
       "Name: PassengerId, dtype: int64"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算男女性别各自的生化人数，放在Series里\n",
    "survival_count_sex = titanic_df[titanic_df['Survived'] == 1].groupby('Sex')['PassengerId'].count()\n",
    "survival_count_sex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Sex\n",
       "female    0.742038\n",
       "male      0.188908\n",
       "Name: PassengerId, dtype: float64"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算男女乘客的生还率，数据放在Series里\n",
    "survival_rate_sex = survival_count_sex/total_count_sex\n",
    "survival_rate_sex"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.4 可视化性别与生还率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmsAAAEiCAYAAACm85XdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHjlJREFUeJzt3X+0XWV95/H3hyClKIKUgJQfJdaoExSpxKitU2GoJWqd\naGsxaIsdaTN0gdRpaxs6VnEsS62VsbZojG0q2tHIKlpSG6WaadHWOibYDJDQ1AhYkoIEf6HYAYLf\n+ePs4OGSe++5ufeeve8979dad92zn733OV/WzXr4nOfZz96pKiRJktRNB7VdgCRJksZnWJMkSeow\nw5okSVKHGdYkSZI6zLAmSZLUYYY1SZKkDjOsSZIkdZhhTZIkqcMMa5IkSR12cNs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qd4cjakCX5YPPyy8Ap9JaEfxi4B3htW3VJkuyj1U2uBh2yJNuBnwI+AZw5dr/PnZOk9thHq4uc\nBh2+NcAmeheqbulrD73nz3kBqyS1xz5anePIWkuSvKeqfrXtOiRJj2QfrS4xrEmSJHWYCwwkSZI6\nzLAmSZLUYYY1TUmS/55kW5IbkmxN8qy2a5Ik9dhHz0+uBtXAkjwH+BngGVV1X5KjgUNaLkuShH30\nfObImqbiOODuqroPoKrurqp/S3J6kuuSXJ/k2iTHJTk4yeYkZwAkeUuSy9osXpLmOfvoecrVoBpY\nkscAfw8cBnwa+Ai9x69cB6yoqj1JXg6cXVWvTnIK8BfAa4C3A8+qqvvbqV6S5jf76PnLaVANrKq+\nk+R04D/Su7P3R4DfA54KfCoJwALgjub4bc2jWz4OPMdOQJJmj330/GVY05RU1YPA3wF/l+RG4EJg\nW1U9Z5xTngZ8EzhmOBVK0uiyj56fvGZNA0vy5CSL+5pOA24GFjYXtpLkUc3QOkl+FjgK+Engj5Ic\nOeyaJWlU2EfPX16zpoE1w+t/BBwJ7AV2AquAE4B3AUfQG619J/AxetdKnFVVtye5GDi9ql7VRu2S\nNN/ZR89fhjVJkqQOcxpUkiSpwwxrkiRJHWZYkyRJ6jDDmiRJUocZ1iRJkjrMsCZJktRhhjVJkqQO\n+/8ttyFMhjN4AQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb835358>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ax1 = plt.subplot(121)\n",
    "survival_count_sex.plot(kind='bar', color='green')\n",
    "ax1.set_ylabel('Survival Count')\n",
    "\n",
    "ax2 = plt.subplot(122)\n",
    "survival_rate_sex.plot(kind='bar')\n",
    "ax2.set_ylabel('Survival Rate')\n",
    "\n",
    "plt.subplots_adjust(left = 0.2, right = 1.5, wspace=0.8)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从条形图看，女性的生还人数比男性多，女性的生化率也比男性高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 结论：\n",
    ">1. 船上男性乘客比女性乘客数量多。\n",
    ">2. 性别与生还的相关系数也较小。\n",
    ">3. 女性乘客获救的数量比男性多。\n",
    ">4. 女性的生还率也比男性高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='question3'></a>\n",
    "### Research Question 3：不同的票等级(pclass)与乘客生还的情况？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.1 单变量探索：船上三个票等级的乘客的分布情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0xbba0898>"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAADuCAYAAAAOR30qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8XHW9//HX95w5M1knTZruC1PakNISaNrSllUB2awG\nATeESxGUn8hFEbwSXIt6r716N6/Xq1evYC9wQUCBQuQissgmiBBoutItdF+SJpnss5zv749z0oSQ\nhLSZmTPL5/l4zIPMZM7MZ0L77jff8z3fj9JaI4QQwnuG1wUIIYRwSCALIUSakEAWQog0IYEshBBp\nQgJZCCHShASyEEKkCQlkIYRIExLIQgiRJiSQhRAiTUggCyFEmpBAFkKINCGBLIQQaUICWQgh0oQE\nshBCpAkJZCGESBMSyEIIkSYkkIUQIk1IIAshRJqQQBZCiDTh87oAIYa0siQPmAYUA/lAnvvfgV+b\nQI976wbqWNkW96ReIRJAAll4Y2WJCZzo3mYOuM1w/zvhGF51yD/Podq6/wBiQKt7awZ2AFsaVy0/\ncAzvI0RSKOk6LZLOCd95wKK+m9b6FKVUQQLfpYeVbfl9dwoqliqccI9NuOxb25RS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f7kniRxZi1CSQRVoIVgf9OCcHy4B8wA8EcEazhQNuBe4tHyeUu3C2Eu37b6f7316gB2dJ\nWitO8PYiRBqTQBZCiDRheF2ASD6lVJ5S6i9KqbeUUuuVUncM87yOVNcmhOjn87oAkRK9wLla6w6l\nlAW8qJR6Qmv9ipdFKaV8Wms5eSaES0bIOUA7+ka/lnsb1VyVUiqklHpGKbVWKfW0UmqmUspUSu1Q\njnFKqbhS6mz3+c8rpSqUUoVKqTvdkXm9UuoS9/vXKKXWKKWeAZ5OxucVIlNJIOcIN0TfxOmn95TW\n+tVRHvoTYLXW+mTgXuDftdZxYDPOWuMzgTeAs5RSAWCG1noL8A3gGa31EuAc4EdKqb4LLRYCH9da\nfyBRn0+IbCCBnCO01nGt9QJgOrBEKXXSKA89Dfhf9+u7cQIY4AXgbPf2A/fxU4HX3O9fANS6/wg8\nh7MGuG9XuKe01oeP/dMIkZ0kkHOM1roVeBa4VCn1pnv7wjG81PPAWThX4/0eGAd8ECeowVlDfLnW\neoF7m6m13uh+r3PwiwkhJJBzglJqglJqnPt1PnA+UD8gLH8+wuEvA592v76S/sD9C04vPltr3QO8\nCfw/nKAGeBK4qW8zIaVUNUKIEUkg54YpwLNKqbU4UwpPaa0fH+J5BUqp3QNutwA3AZ91j/0b4MsA\nWuteYBfQt1LjBaAYZwMegO/hnDxcq5Ra794XQoxALgwRQog0ISNkIYRIExLIQgiRJiSQhRAiTUgg\nCyFEmpBAFkKINCGBLIQQaUICWQgh0oQEshBCpAkJZCGESBP/Hy53s2Zz7E0aAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x9465ba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画三种票等级人数的比例饼图\n",
    "count_each_pclass = pd.Series(titanic_df.groupby(['Pclass'])['PassengerId'].count().values, \n",
    "                        index = ['1-Upper','2-Middle','3-Lower'])\n",
    "\n",
    "count_each_pclass.plot(kind='pie', autopct = '%1.1f%%', shadow = True, explode = [0.05,0.05,0.05])\n",
    "\n",
    "plt.axis('equal')\n",
    "plt.ylabel('')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从饼图可以看出，所有乘客中，票等级是3(Lower)等级的乘客比例最高, 超过一半。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.2 计算生还字段(Survived)与票等级(Pclass)的相关系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.32353318439409545"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df['Survived'].corr(titanic_df['Pclass'], method = 'kendall')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生还字段与票等级字段的相关系数很小，相关度很弱。相关系数在这里仅仅作为参考。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.3 计算三种票等级的乘客的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1-Upper     136\n",
       "2-Middle     87\n",
       "3-Lower     119\n",
       "dtype: int64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算三种票的乘客的生还数\n",
    "survived_count_each_pclass = pd.Series(titanic_df[titanic_df['Survived'] == 1].groupby(['Pclass'])['PassengerId'].count().values,\n",
    "                                      index = ['1-Upper','2-Middle','3-Lower'])\n",
    "survived_count_each_pclass"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1-Upper     0.629630\n",
       "2-Middle    0.472826\n",
       "3-Lower     0.242363\n",
       "dtype: float64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算三种票的乘客的各自的生还率\n",
    "survived_rate_each_pclass = survived_count_each_pclass/count_each_pclass\n",
    "survived_rate_each_pclass"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 3.4 可视化票等级与生还率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0MAAAEqCAYAAADXpItUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu4HWV59/HvjyBYBARKRCBEUKkKeEAD2mpVRAtaNdpa\n5WBFxfLSV2utVkXfKlq1xVqtWrWYKopHiqeSWuQgHrAeCYggUGrkIEEOAZWTFgjc7x8z0cVm752V\nZK81yZrv57rWtdc8M7PmXis7z73vNc88k6pCkiRJkvpmk64DkCRJkqQuWAxJkiRJ6iWLIUmSJEm9\nZDEkSZIkqZcshiRJkiT1ksWQJEmSpF6yGNLQkhyb5A0jeN03JfnEXL/upEvytSQv6ToOSdLGzfw+\nXn4uGxaLoY1ckscl+VaSG5L8LMk3k+wzimNV1ZFV9ZZRvPZskmyd5N1JfpLk5iQ/bpe3H/FxX5jk\nv0Z5jIHj3NG+txuTnJvk6aM+riRpwzXp+T3JE5Pc2ea+m5JcnORFa7F/5wVFkl2TVPsebk5yWZKj\nuoxJa89iaCOWZGvgi8A/A9sBOwNvBm5dh9dKkg3u9yHJZsAZwJ7AgcDWwO8C1wH7dhjaXPt2VW0J\nbAN8GDgxybYdxyRJ6kAf8nvrp23u2xr4K+Bfkzyo45jWxTbt+zgYeGOSA7sOSMPbUP9zaDi/A1BV\nn66qO6rqV1V1WlWdB3f/1mTgG4xN2+WvJXlbkm8CvwRenWTZ4AGS/FWSpe3zjyZ5a/v8osGzF0k2\nTbIyySPb5ce032j9IskPkjxxYNvdkny9/SbodGC2MzwvABYCz66qC6vqzqq6tqreWlUnt6/3kPa9\n/CLJBUmeOX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okHwP2Ak4GTqiqH3YcUu8kOaKq\nlnQdhyTNJfP5eJnPu9eHfG4x1JE+/HJ1JcmdwOrENPgLHqCqauvxR9UvSc7xQmJJfWA+Hx3zeff6\nkM8thjrSh18u9VeS71fV3l3HIUmjZj7XJOtDPt+k6wB6zFlnxijJEV3HMMmS7Jtkn/b5HsDnkjyt\n47AkaRzM52NkPh+tPuZzzwx1JMmCqlqR5EVV9ZGu45l0fnM3Ou1NCJ9KMyHL6cCjga/STId6alW9\nrcPwJGmkzOfjZT4fnb7mc4uhjk3yHX03JH04zduVdnalRwCbA1cDC6rqxiS/BXy3qh7WaYCSNAbm\n8/Ewn49OX/O5U2uPQZLzZloF7DDOWPoiyYOBnWn+894MPKNtP7CqTuk0uMmzqr0XxC+T/LiqbgSo\nql+1F79K0kQwn4+f+XysepnPLYbGYwfgAO5+Q7YA3xp/OJMtycuBlwIXAR9O8pdVdVK7+u9obuCm\nuXNbki2q6pfAo1Y3Jrk3MLGdp6ReMp+Pkfl87HqZzy2GxuOLwJZVde7UFUm+Nv5wJt6fAY+qqpuT\n7Ap8NsmuVfUevNB1FB5fVbcCVNVgZ3kP4LBuQpKkkTCfj5f5fLx6mc+9ZkgTJ8kFVbXnwPKWwGeB\nC4EnVdUjOgtOkiQNxXyucXBqbU2ia5L8uoNsxxg/HdgeeGhnUUmSpLVhPtfIeWZIEyfJApqLAK+e\nZt1jq+qbHYQlSZLWgvlc42AxJEmSJKmXHCYnSZIkqZcshiRJkiT1ksWQJEmSpF6yGJIkSZLUSxZD\nkiRJknrp/wNZjzv2td6dOgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbbab0b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画条形图\n",
    "ax1 = plt.subplot(121)\n",
    "survived_count_each_pclass.plot(kind='bar', color='green')\n",
    "ax1.set_ylabel('Survival Count')\n",
    "ax1.set_title('Survived Count vs Pclass')\n",
    "\n",
    "\n",
    "ax2 = plt.subplot(122)\n",
    "survived_rate_each_pclass.plot(kind='bar', color='blue')\n",
    "ax2.set_ylabel('Survived Rate')\n",
    "ax2.set_title('Survived Rate vs Pclass')\n",
    "\n",
    "plt.subplots_adjust(left=0.2, right = 2.0, wspace = 0.8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从条形图看，票等级为1(1-Upper)的乘客的生还人数较多，票等级为1(1-Upper)的乘客的生还率也较高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 结论：\n",
    ">1. 持等级3(Lower)票的乘客数量的比例最高。\n",
    ">2. 票等级字段与生还字段的相关系数很小。\n",
    ">3. 从条形图看，持等级为1(1-Upper)票的乘客的生还数量最多。\n",
    ">4. 从条形图看，持等级为1(1-Upper)票的乘客的生还率也较高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='question4'></a>\n",
    "### Research Question 4：不同登陆港口的乘客与生化情况如何？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 4.1 单变量探索：看看从三个港口登陆的乘客的数量分布情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Embarked\n",
       "C    168\n",
       "Q     77\n",
       "S    644\n",
       "Name: PassengerId, dtype: int64"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df.groupby(['Embarked'])['PassengerId'].count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Embarked\n",
       "C    168\n",
       "Q     77\n",
       "S    644\n",
       "Name: PassengerId, dtype: int64"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算分别从三个港口登陆的数量. C = Cherbourg, Q = Queenstown, S = Southampton\n",
    "count_from_each_port = titanic_df.groupby(['Embarked'])['PassengerId'].count()\n",
    "count_from_each_port"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0xc0e96d8>"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAADuCAYAAAAOR30qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8XGd97/HPc2afkY52WfIqL/IuJ8qCkngJIQuBQIA2\nUAK3NUtL4La53C63Vy20FRe4pO0LmrKEQC6LIQVCWR2UEJo9gSwkKI4cB9lxIseON60zo3WW89w/\nzpEjx3K8zHJm+b1fr4l0RqOZnxT5q0fPqrTWCCGEcJ/hdgFCCCFsEshCCFEgJJCFEKJASCALIUSB\nkEAWQogCIYEshBAFQgJZlDWl1EKl1M+VUnuUUi8qpb6slAq4XZcoTxLIomwppRTwE+BnWutWoBUI\nAf/iamGibClZGCLKlVLqcuCftNZbZt1nAvuARVrrMdeKE2VJWsiinK0Dnp59h9Y6BvQDK9woSJQ3\nCWQhhCgQEsiinO0Czp99h9Nl0QT0uVKRKGsSyKKc3QeElVJ/AqCU8gCfB76stZ50tTJRliSQRdnS\n9oj2u4DrlFJ7gCHA0lp/1t3KRLmSWRZCOJRSlwDfB96ltf6d2/WI8iOBLIQQBUK6LIQQokBIIAsh\nRIGQQBZCiALhdbsAIebUVVUPLMGeE/zaWz0QBPzOLTDr/QQwDow5b2duI8Ah4CBwAHt59D66ohN5\n+5qEOAUZ1BOFo6uqEvgVsBKozdOrHgZ2As8CO5y3u+iKJvL0+kIcI4EsXHftKl8QWAvM+/F7Qj/x\neVTQ5ZKSwO+BXwMPAA/SFT3qbkmiHEiXhSgE5wJ/CYwNTuhoc6XrgewD2pzbRwHoqtqFHc4PAP9F\n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Hpw9OD1tTVhq7qyXs3GampO0DdgJ7gf5YTyya2++SECeSQBY5Z7ab\nQexQXoi9CGUlUIczlQ4wnPensIM6Net2JhR2P69v1i2APQBnzXqdw9jnD/7eeftKrCeWOLuvTojs\nkUAWrjDbTT/2Ps112H2184AFzn0R5xZmphX8mtb0a6hZb8exW+BR7O6SI9jHWQ1hL3SJykINUagk\nkEXBchapBLDPCAzyavDq19ws7H7qKQlbUcwkkIUQokAU3fxQIYQoVRLIQghRICSQhRCiQEggCyFE\ngZBAFkKIAiGBLIQQBUICWQghCoQEshBCFAgJZCGEKBASyEIIUSAkkIUQokBIIAshRIGQQBZCiAIh\ngSyEEAVCAlkIIQqEBLIQQhQICWQhhCgQEshCCFEg/j8zPi/RzxbkJgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbba0390>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画从三个港口登录的乘客的饼图\n",
    "count_from_each_port.plot(kind='pie',autopct = '%1.1f%%', shadow = True, explode = [0.05,0.05,0.05])\n",
    "plt.axis('equal')\n",
    "plt.ylabel('')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从饼图看出，从S港口(Southampton)登录的乘客最多，达到70%多。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 4.2 计算登陆港口字段(Embarked)与生还字段的相关系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.15779501104311747"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_df['Survived'].corr(titanic_df['Embarked'], method = 'kendall')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生还字段与登陆港口字段的相关系数很小，相关度很弱。相关系数在这里仅仅作为参考。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 4.3 计算各个港口登陆的乘客的生还数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Embarked\n",
       "C     93\n",
       "Q     30\n",
       "S    217\n",
       "Name: PassengerId, dtype: int64"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算从三个港口登陆的乘客的生还数\n",
    "survived_count_each_port = titanic_df[titanic_df['Survived'] == 1].groupby(['Embarked'])['PassengerId'].count()\n",
    "survived_count_each_port"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Embarked\n",
       "C    0.553571\n",
       "Q    0.389610\n",
       "S    0.336957\n",
       "Name: PassengerId, dtype: float64"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#计算从每个港口登录的乘客的生还率\n",
    "survived_rate_each_port = survived_count_each_port/count_from_each_port\n",
    "survived_rate_each_port"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#### 4.4 可视化每个港口的生还率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0MAAAEUCAYAAADp1O2JAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcJXV57/HPl0HEKIsIArI4KCACQYIDEvUqigZwyQQX\nBFcSkrkkLtebaMTEKKhETCJXjQuOSgATGHFljCgqxrihMiCibHECmAFZBhQYEIGB5/5R1XDm0Mvp\nmek+3V2f9+vVrzn1qzpVzzln+vz6qd9Tv0pVIUmSJElds8GwA5AkSZKkYTAZkiRJktRJJkOSJEmS\nOslkSJIkSVInmQxJkiRJ6iSTI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nRPZtumuTLSa5IclKSDdrnf7R93iVJjuvb73uTXAi8tKd9gySn\nJHl3u/wHSc5LcmGSzyR5RNt+cJLL2+e/aFreDElS59kvqotMhtQFD+srB3hZz7r/ac+OfQc4BXgJ\nsD9wXM82+wGvB3YHHs8DX8R/W1ULgL2AZybZq+c5N1fVPlW1pF3eEPg34OdV9bYkWwJvA55TVfsA\ny4C/TLIx8HHghcCTgW3W03sgSdII+0WpZZmcumC8coCl7b8/pbnZ2CpgVZK7kmzervtRVV0JkOQM\n4OnAZ4HDkiyi+T3alqZTuLh9zqf7jvMx4MyqOr5d3r/d/ntJoLmh4HnAbsBVVfXz9nj/Cixau5ct\nSdKo7BellsmQuu6u9t/7eh6PLI/8fvTfjKuS7AS8Cdi3qn6d5BRg455t7uh7zveBZyV5X1X9Fgjw\n9ao6onejJEOp4ZYkqWW/qE6xTE6a2H5Jdmprol8GfBfYlOaL/dYkWwOHTLCPTwJnA2cm2RD4AfC0\nJDsDJHl4kl2By4H5SR7fPu+IUfcmSdLw2C9qznBkSF3wsCQX9Sx/taoGnkYUOB/4ELAz8B/AF6rq\nviQ/pvmSXgF8b6KdVNWJSTYDPgW8AjgSOCPJQ9tN3lZV/9WWGHw5yW9oarY3mUSskiRNxH5RaqWq\nf6RTkiRJkuY+y+QkSZIkdZLJkCRJkqROMhmSJEmS1EkmQ5IkSZI6yWRIkiRJUieZDEmSJEnqJJMh\nSZIkSZ1kMiRJkiSpk/4/MU/OJvZvBsYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbb92908>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画条形图\n",
    "ax1 = plt.subplot(121)\n",
    "survived_count_each_port.plot(kind='bar',color = 'green')\n",
    "ax1.set_ylabel('Survival Count')\n",
    "ax1.set_title('Survival Count vs Port Name')\n",
    "\n",
    "ax2 = plt.subplot(122)\n",
    "survived_rate_each_port.plot(kind='bar', color = 'blue')\n",
    "ax2.set_ylabel('Survival Rate')\n",
    "ax2.set_title('Survival Rate vs Port Name')\n",
    "\n",
    "plt.subplots_adjust(left = 0.2, right = 2, wspace = 0.4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从条形图看出，从S港口登录的乘客生还人数最多，而从C港口登录的乘客的生还率最高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 结论：\n",
    ">1. 从S港口登陆的乘客数量最多。\n",
    ">2. 生还字段与登陆港口字段的相关系数很小。\n",
    ">3. 从条形图看，S港口的乘客生还数量最多。\n",
    ">4. 从条形图看，从C港口登陆的乘客的生还率最高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='question5'></a>\n",
    "### Research Question 5：费用与票价等级的对应关系如何？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 5.1 单变量探索：费用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEICAYAAABRSj9aAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFOlJREFUeJzt3X+s3Xd93/HnCyeYimQkwRfP2Aab1aVzuiVQzwMFMUZG\nYwrCUTdlZqVzq0ip1LQCFamzB+pKVW9h0hCsWqZZwGrEj9SlhbigdXJcEGKiCTchQJzEtUli2cY/\nLmlTkrRycfLeH+fj9nCxfc/xvTfX/uT5kI6+n+/n+/mc7+dzLb/O937O95ybqkKS1K8XLPQAJEnz\ny6CXpM4Z9JLUOYNekjpn0EtS5wx6SeqcQa8LRpK9Sd70HJznsST/ar7P0871O0m+l+TYc3E+6UwM\nej0nzhSuSX4xyVdP71fV1VX15RmeZ1WSSnLJPA11+FxvSnJ4Fv1fAbwXWFtV//Asz/9skqeGHn88\nmzFLZzLv/1mk57FXAI9X1YlztPluVa2YzUmSXFJVp2b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1TX\n61xh8KJ9V5J729e7wAU0X/84+EWmqipJV/fEJrkM+EPgPVX1/SR/d6yn+VbVM8C1Sa4APpfkp6Yd\n72KuSd4OnKiqe5O86UxtepnrkDdU1ZEkLwN2J3l4+OBCz/divqJ/Pn3NwvEkywDa9kSrv+h/Bkku\nZRDyn6qqP2rV3c4XoKqeAL4EbKDPuV4HvCPJYwyWVN+c5JP0OVcAqupI254APsdgKeaCme/FHPTP\np69Z2AVsbuXNwJ1D9ZuSLE6yGlgD3LMA4zsvGVy6fwx4qKo+NHSou/kmmWhX8iT5MQZ/q+FhOpxr\nVW2tqhVVtYrB/8s/rap30eFcAZK8OMnlp8vAzwAPcCHNd6HfrZ7lO90/y+BOje8A71vo8czRnD4D\nHAV+wGDt7mbgpcAeYD9wF3DVUPv3tfnvA9660OMfc65vYLC2+S3g/vb42R7nC/xT4Bttrg8Av9nq\nu5vrtHm/ib+/66bLuTK48++b7bH3dBZdSPP1KxAkqXMX89KNJGkEBr0kdc6gl6TOGfSS1DmDXpI6\nZ9BLUucMeknq3P8H6yytqAEZZhAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc72cef0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画费用的直方图\n",
    "titanic_df['Fare'].hist()\n",
    "#设置标题\n",
    "plt.title('Hist plot of Fare')\n",
    "#消除网格线\n",
    "plt.grid(False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从直方图看出，大部分乘客的费用很低，在0-100之间。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 5.2 可视化：画票等级与费用的箱线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEICAYAAACuxNj9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/A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gHybpaeCfy77pt/oM8A1JV6b5SyLiybLlv5X0CNkJus+Vlf+C\n7NvSMOBf0xDGs5KOB+5Lv6/NwKeBPT17ZP3ee4EzgUfTkALARenJjfuJiKeBr+Vs8wvAdyXNBZaX\nld9Edu7pMeAp4L52tv+ipM8CS9IYOWTnMH7VucOpSUcBiyUNJPtSvCwiftxOvTelv81WVwLnAddJ\n+iLwIvDnABHRImkLWfKGLImcDrR+SfhX4CrgF+mKw43AR3v2sIrj231UMUkl4G8j4qE25RcDzRHx\nlSLiMrPa42EoMzPL5Z6FmZnlcs/CzMxyOVmYmVkuJwszM8vlZGFmZrmcLMzMLNf/AK0j331FG9oR\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc8314a8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画箱线图\n",
    "fare_pclass_1 = titanic_df[titanic_df['Pclass'] == 1]['Fare']\n",
    "fare_pclass_2 = titanic_df[titanic_df['Pclass'] == 2]['Fare']\n",
    "fare_pclass_3 = titanic_df[titanic_df['Pclass'] == 3]['Fare']\n",
    "\n",
    "plt.boxplot([fare_pclass_1,fare_pclass_2,fare_pclass_3], labels=['1-Upper', '2-Middle', '3-Lower'])\n",
    "#设置y轴标签\n",
    "plt.ylabel('Fare', fontsize = 12)\n",
    "#设置标题\n",
    "plt.title('Boxplot of Fare vs Pclass', fontsize = 12, color = 'red')\n",
    "#设置y轴边界值\n",
    "plt.ylim(-20,550)\n",
    "#添加网格线\n",
    "plt.grid()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "从箱线图看出，票等级不同的乘客的费用是不同的，总体上1级(1-Upper)平均费用最高，其次到2级(2-Middle)，3级(3-Lower)费用最低。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "<a id='question6'></a>\n",
    "### Research Question 6：不同费用的乘客的生还情况如何？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 画费用与生化与否的箱线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#计算生还和死亡的乘客的费用\n",
    "fare_survival = titanic_df[titanic_df['Survived'] == 1]['Fare']\n",
    "fare_notsurvival = titanic_df[titanic_df['Survived'] == 0]['Fare']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0xcd9aeb8>"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAENCAYAAADOhVhvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+8lGWd//HX+wCBSSVkEYqF22ohoG5SbWUG68Ixd7/i\nbn1dc20xWVzAZf1+tVSiVtsNkW2jWo2DGor9wh+5fkVXAwJORasZloHAlpa/QNP8gXUMUODz/eO+\nBuYMM+fMuTmc+xzO+/l4zGNmrvu67/szM9fcn/u67vueUURgZmaWR0PRAZiZWc/lJGJmZrk5iZiZ\nWW5OImZmlpuTiJmZ5eYkYmZmuTmJWK8gabWkHUXHUa47xmT7j6RNkh4pOo5ynRFTr0wikqKd2zlF\nx9idSTpc0lckbZT0B0lbJT0hqVnS5yX9UdExWve3LxswSe+U9DVJv5K0TVKLpEclLZX0WUlv6ux4\nrbq+RQdQsM/VKH+wS6PoQSQdB6wCBgE/BxYBLwJvBt4LzAIeAX5dUIi1nAUcVHQQtu8kjQfuBPoD\n/w3cDfweOBx4PzAB+CHQXFCItXwIOOCu7u7VSSQiLi86hh7oK2QJ5DMRMbtyoqQ/Bvp0eVTtiIgn\nio7B9p0kAdeQJZCzI+JbVeocBzzX1bG1JyJ+VXQM+0VE9Lob2d5A1Fn3HcBc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ZCbgH8EXgDWRMTvq6zmVrIdpreQ7RgBCJgTEdeUV5T0f/bh5Rxw3BM5gKUzW44qKzqe7BeN\nHyPb4AN8pJ3F3AxcDLwhItZWTky9nZ+QDVPdFRE7097Zo5L+d4pDaQ8P4EdkPRaAv+34q7KeICJe\nIOvJTi4r/m9af/Y/TI9/D7yu2nIknSKpX3r8FuCNwGayNny8pAZJR5ANOdXyfeBdwBT2HsoquTnF\n9lGyhALZv6eem3rWSDpc0puBHwCnSzpI0uuA/9XGug94TiIHtoHAjZI2SFpLdrzjcuBzwFckrSHr\n+rflO2RfrlvaqHMzcDZ79uAg20hMTgc31wMTU/kFwPmpV3R4x16O9TBfJPt59pIZwCdSW/w4WVuA\nbMP+KUk/q3JgfQLwUGpHS8mOnfyGbGfkUbIzuv6DrNdTVeqV3AV8ON1Xq7OeLJFtjoinU9kysuG3\ne1N7/Q7wuoj4KVlb/zlwD9lOVK/lnz0xM7Pc3BMxM7PcnETMzCw3JxEzM8vNScTMzHJzEjEzs9yc\nRMzMLDcnETMzy+3/AwmIoaHJ27G/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xcab2940>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画箱线图\n",
    "plt.boxplot([fare_survival,fare_notsurvival], labels = ['Survived', 'Not Survived'])\n",
    "#设置y轴边界值\n",
    "plt.ylim([-20, 550])\n",
    "#设置y轴标签\n",
    "plt.ylabel('Fare', fontsize = 20)\n",
    "#添加网格线\n",
    "plt.grid()\n",
    "#添加标题\n",
    "plt.title('Fare vs Survived or not Survived', fontsize = 20)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "从箱线图看，生还的乘客总体上费用更高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='question7'></a>\n",
    "### Research Question 7：从三个港口登陆的乘客的费用是否有不同？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 画费用与不同港口的项线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#分别计算从三个港口登陆的乘客的费用\n",
    "fare_port_c = titanic_df[titanic_df['Embarked'] == 'C']['Fare']\n",
    "fare_port_q = titanic_df[titanic_df['Embarked'] == 'Q']['Fare']\n",
    "fare_port_s = titanic_df[titanic_df['Embarked'] == 'S']['Fare']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEbCAYAAADAsRPLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucFfV9//HXG9DFYFRozNYIBn6VJIKQC0Qb0IYNAlYr\nJNXkJ7/WmJbAb73QtJhfEG0a01+RYNUmJYEthCb214DRGLJrEwXU3dRrDEbDzRhQMUK9JPG6VDZc\nPr8/ZhbPrrMXLrOzu+f9fDzO48x85ztzPufM7vmc73e+M6OIwMzMrLU+RQdgZmbdkxOEmZllcoIw\nM7NMThBmZpbJCcLMzDI5QZiZWSYnCLMeRtJZkkLS3xYcx32S9hT02v+QfgZnFPH65cIJokyl/1zt\nPT5TdIzdlaTPduLz21p0nGaHql/RAVjhvtxG+WNdGkXP9ChQ18ayl7oyELM8OEGUuYi4pugYerCf\n+fOz3sxdTNYhSe+VtFDSOkm/ltQkaZukf5F0Ykb9/X3kkv5Q0o8kvZSWDS6pN0TSYklPpdv8raRa\nSWM6GdcZ6TZvbafOLyW9Iem4dF6S/kLSg+l72SXpWUl3SrrgYD6fTsa6XdJWScdI+lo6/4akRyVN\nTev0k/RFSVvSuLZKuqSD7Y6XdLek19LHHZI+lFHvRElfkvSApOcl/U7SDknfkfS+jPonp5/tN9P9\nf2v6ee3rqN9f0qQ0lh2SRrda9hFJt0l6IY3hWUk1kk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\n8SXgcuD8omMqihNE93MPUCFpVnOBpNGSziwwJuucu4G3Sfo0gKS+wA3A1yPijUIjs06R9F5Jw0uK\nPkDvvmJ0u5wguplITm3/BHBWOsx1E7AAeL7YyKwjJfvuAklbgN8C+yJifrGR2QE4GrhJ0mZJ64ER\nwDXFhlQcX2rDLCeSxgErgU9ExM+KjsfsQDlBmJlZJncxmZlZJicIMzPL5ARhZmaZnCDMzCyTE4SV\nHUl706t0bpR0q6S3HeD6V7WzbJuk20rmL5D07UMI16wwThBWjt6IiA9ExKnA74DqzqykRB+gzQSR\nGiNpxKEGaVY0Jwgrd/eSXkhP0py0VbFR0l+nZUMlPSHp34CNwHLgqLQF8p02tnkDcHXrQkmnSXpQ\n0qOSHpD03rT8M5J+IGlt2gK5PI3lUUkPSRqU1vsDSXem9wi5V9L7Dv/HYfYmX+7bypakfsAfA3dK\nGgP8BXA6IOAnkn4MvExyX4eLI+KhdL1PRsQH2tn0LcClklpfwfUXwJkRsUfSWcC1vHmdn1OBDwL9\nga3A3Ij4oKR/Aj4NfBVYClRHxJb0JjaLSS4xbpYLJwgrR0dJeiydvpekVXAJsCoidgJI+j5wJlAH\nPNOcHDppL/CPJDd6uqOk/FiSyzgMBwI4omRZfUS8Drwu6VXg9rR8AzBa0tHAOODW5L5EAPhOdZYr\nJwgrR2+0bgGUfOlm2XkQr/H/SBLExpKy/0uSCD4haSjQULKsqWR6X8n8PpL/0z7AKx20XMwOKx+D\nMEvcC3xc0tskDSC56N69bdTdLemINpYBEBG7gX8C/qak+FhgRzr9mQMJLr3x0NOSPgn7D5i//0C2\nYXagnCDMgPRiet8GHgZ+AnwzIh5to/pSYH07B6mbLadlK/06YIGkRzm41vufATMk/ZzkviHTDmIb\nZp3mi/WZmVkmtyDMzCyTE4SZmWVygjAzs0xOEGZmlskJwszMMjlBmJlZJicIMzPL9P8BD+TXVOCK\npu4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xca4e588>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#画箱线图\n",
    "plt.boxplot((fare_port_c,fare_port_q,fare_port_s), labels = ('C','Q','S'))\n",
    "#设置x轴标签\n",
    "plt.xlabel('Port Name', fontsize = 10)\n",
    "#设置y轴标签\n",
    "plt.ylabel('Fare', fontsize = 10)\n",
    "#设置标题\n",
    "plt.title('Fare vs Embarked',fontsize = 20)\n",
    "#设置网格线\n",
    "plt.grid(True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "总体上，从C港口登陆的乘客的费用较高。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='conclusions'></a>\n",
    "## Conclusions\n",
    "### 单变量探索\n",
    "(1). 总体死亡人数比获救生还的人数多。<br />\n",
    "(2). 大部分的乘客年龄在20-40虽之间。<br />\n",
    "(3). 船上的男性乘客比女性乘客的数量多。<br />\n",
    "(4). 所有乘客中，票等级是3(Lower)等级的乘客比例最高, 超过一半。<br />\n",
    "(5). 从S港口登陆的乘客数量最多。<br />\n",
    "(6). 大部分乘客的费用很低，在0-100之间。\n",
    "\n",
    "### 部分变量的相关系数\n",
    "(1). 生还字段与年龄段字段的相关系数很小，r = -0.0562(年龄段被划分成['(0, 12]', '(12, 24]', '(24, 36]', '(36, 48]', '(48, 60]', '(60, 72]', '(72, 84]'] <br />\n",
    "(2). 生还字段与性别字段的相关系数很小，r = -0.5434 <br />\n",
    "(3). 生还字段与票等级字段的相关系数很小，r = -0.3235 <br />\n",
    "(4). 生还字段与登陆港口字段的相关系数很小，r = -0.1578<br />\n",
    "相关系数在这里仅仅作为参考。\n",
    "\n",
    "### 生还率数据探索结果 & 费用数据探索结果\n",
    "(1). 在(0-12]年龄的乘客生还率最高，在(60,72]年龄段的乘客的生还率最低，其它各年龄段的生还率差别不是很大。<br />\n",
    "(2). 女性的生还数量比男性多，女性的生还率也比男性高。<br />\n",
    "(3). 票等级为1(Upper)的乘客的生还率最高。<br />\n",
    "(4). S港口的乘客生还数最多，但是C港口的乘客的生还率最高。<br />\n",
    "<br />\n",
    "(5). 票等级不同的乘客的费用是不同的，总体上1级(1-Upper)平均费用最高，其次到2级(2-Middle)，3级(3-Lower)费用最低。<br />\n",
    "(6). 生还的乘客总体上费用更高。<br />\n",
    "(7). 从C港口登陆的乘客的费用较高。\n",
    "### 存在的限制性\n",
    "(1). 年龄的缺失值有177个，报告中是用平均值来填充的，是否可能会使数据出现偏差而导致分析出现偏差呢？<br />\n",
    "(2). 报告中分别计算的生还率与几个变量之间的相关系数都很小，相关性很弱。是不是还有其它因素影响到生还率还没有数据呢？<br />\n",
    "(3). 会不会有一些交叉作用的因素与生还率相关性较强而没有分析到呢？<br />\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "<a href=\"#title\">**返回页首**</a>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
